package com.yewen.http.controller;

import com.yewen.http.entity.LoginAccount;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;

@Controller
@RequestMapping
public class MainPageHandler {
    @GetMapping
    public ModelAndView login(HttpServletRequest request){
        ModelAndView view = new ModelAndView();
        if (request.getParameter("isLogin")!=null&&request.getParameter("isLogin").equals("false")){
            view.addObject("isLogin","false");
        }
        view.setViewName("login");
        return view;
    }
}
